<template>
  <div id="orders">
    <div class="title_div">我的订单</div>
    <div class="item_div" v-for="item in dataList">
      <div class="item_top_div">
        <span>{{item.shopName}}</span>
        <span>{{item.status}}</span>
      </div>
      <div class="item_bottom_div">
        <div class="item_bottom_left_div">
          <img v-for="url in item.imgs" :src="url"/>
        </div>
        <div class="item_bottom_right_div">
          <p>￥{{item.price}}</p>
          <p>共{{item.num}}件</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default{
    data(){
      return{
        dataList:[
          {"shopName":"沃尔玛","status":"已取消",imgs:[require("../assets/orders/icon_order.png"),require("../assets/orders/icon_order.png")],price:66.69,num:6},
          {"shopName":"沃尔玛","status":"已取消",imgs:[require("../assets/orders/icon_order.png")],price:36.88,num:2}
      ]
      }
    }
  }
</script>

<style>
  /* 单独给页面设置背景色 */
  #orders{
    background-color: #f8f8f8;
    height: 100%;
    position: fixed;/* 固定定位  相对于浏览器来说*/
    width: 100%;
  }
  .title_div{
    height: 44px;
    font-size: 16px;
    color: #333333;
    background: white;
    line-height: 44px;
    text-align: center;
  }
  .item_div{
    background: #FFFFFF;
    margin-top: 16px;
    margin-left: 18px;
    margin-right: 18px;
    border-radius: 4px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 16px;
  }
  .item_div .item_top_div{
    height: 54px;
    line-height: 54px;/* 上下居中 */
    display: flex;
    justify-content: space-between;/* 弹性布局 左右排列 */
  }
  .item_div .item_top_div :nth-child(1){
    font-size: 16px;
    color: #333333;
  }
  .item_div .item_top_div :nth-child(2){
    font-size: 14px;
    color: #999999;
  }
  .item_div .item_bottom_div{
    display: flex;
    justify-content: space-between;/* 弹性布局 左右排列 */
    align-items: center;
  }
  .item_bottom_div .item_bottom_left_div img{
    width: 36px;
    height: 36px;
    margin-left: 6px;
    margin-right: 6px;
  }
  .item_bottom_div .item_bottom_right_div{
    text-align: right;
    }
  .item_bottom_div .item_bottom_right_div :nth-child(1){
    font-size: 14px;
    color: #E93B3B;
  }
  .item_bottom_div .item_bottom_right_div :nth-child(2){
    font-size: 14px;
    color: #E93B3B;
  }
</style>